﻿using System;
using System.Collections.Generic;
using NHibernate.Envers.Configuration.Attributes;

namespace TheBlog.NhibernateModel.Entities
{

    [RevisionEntity]
    public class ArgeLogRevInfo
    {
        private ISet<string> _modifiedEntityNames;

        [RevisionNumber]
        public virtual long RevNum { get; set; }

        [RevisionTimestamp]
        public virtual DateTime RevDate { get; set; }
      
        public virtual TimeSpan Version { get; set; }

        public virtual Guid? UserId { get; set; }

        public virtual string Controller { get; set; }

        public virtual string Action { get; set; }

        public virtual string RawUrl { get; set; }

        public virtual string Ip { get; set; }

        public virtual string SessionId { get; set; }
        public virtual ISet<string> ModifiedEntityNames
        {
            get
            {
                _modifiedEntityNames = _modifiedEntityNames ?? new HashSet<string>();
                return _modifiedEntityNames;
            }
            set { _modifiedEntityNames = value; }
        }

        public virtual string BrowserInfo { get; set; }
    }
}